<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <c:set var="path" value="${pageContext.request.contextPath }"/>
    <title>仓库管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="${path}/css/ros_right.css" type="text/css"></link>
  	<script language="javascript" src="${path}/js/table.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript">
  		function showDialogForEdit(id){
			window.showModalDialog('StorageAction!updateStorageDialog?storage.storageId='+id,'','dialogWidth=450px;dialogHeight=350px;');
		}  	
		
		function showDialogForAdd(){
			window.showModalDialog('${path}/jsp/basicinfo/addstorage.jsp','','dialogWidth=450px;dialogHeight=350px;');
		}  	
		
  	</script>

  </head>
  
  <body>
   
   <div class="formtable_title">
	<span class="icons iconsh">&nbsp;</span><strong class="title">查询条件</strong>
	</div>
	<s:form action="StorageAction!storageList">
	<table border="0" cellspacing="0" cellpadding="0" class="formtable">  
	  <tr>
	    <td align="right" class="formtable_td01">仓库名称：</td>
	    <td class="formtable_td02"><input  type="text"  name="storage.storageName" id="storage.storageName"  class="input" /></td>
	  </tr> 
	</table>
	<div class="buttondiv">
 	  <input  class="button" type="button" name="btnProductAdd" id="btnProductAdd" onclick="showDialogForAdd()" value="商品仓库新增"/> 
 	  <input  class="button" type="submit" name="btnSearch" id="btnSearch" value="查 询" />
	</div>
  	</s:form>
  	<div class="listtable_title">
	<span class="icons iconsh">&nbsp;</span><strong class="title">仓库列表</strong>
	</div>
	
	<table border="0" cellspacing="0" cellpadding="0" class="listtable">	
			<tr>
				<th align="center" nowrap="nowrap">序号</th>				
				<th>仓库名称</th>
				<th>仓库描述</th>
				<th>操作</th>
			</tr>	
		<c:forEach items="${ storages }" var="storage"  varStatus="status" >
			<tr>
				<td align="center" nowrap="nowrap">${ status.index + 1}</td>
				<td align="center">${storage.storageName }</td>
				<td align="center">${storage.storageDescribe }</td>
				<td align="center">
					<img src="${path }/images/page_white_edit.png" alt="修改" onclick="showDialogForEdit(${storage.storageId})"/>
					<a href="StorageAction!deleteStorage?storage.storageId=${storage.storageId }">
						<img src="${path }/images/cross.png" alt="删除"/>
					</a>
				</td>
			</tr>	
		</c:forEach>
	</table>
	<div class="pagein fr"> <span class="text">检索到 <strong>${fn:length(storages)}</strong> 条记录</span></div>
  
	
   
  </body>
</html>
